package com.ruoyi.student_club.utils;

import com.ruoyi.student_club.constants.Gender;
import com.ruoyi.student_club.domain.User;

/**
 * @Author lin
 * @Date 2022/1/14 11:11
 */
public class SexUtil {

    private static final String NONE = "未知";
    private static final String MAN = "男";
    private static final String WOMAN = "女";

    public static String getSex(User user){
        if (user.getGender().equals(Gender.NONE.getCode())){
            return NONE;
        }if (user.getGender().equals(Gender.MAN.getCode())){
            return MAN;
        }else {
            return WOMAN;
        }
    }
}
